home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 34 / Amiga Format CD34 (1998-11-20)(Future Publishing)(GB)[!][Christmas issue].iso / -seriously_amiga- / programming / c / mesa-2.6 / lib / mesamain.c < prev    next >
C/C++ Source or Header  |  1998-10-01  |  3KB  |  94 lines

  1. /*
  2.  * AmigaMesaRTL graphics library
  3.  * Version:  2.0
  4.  * Copyright (C) 1998  Jarno van der Linden
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Library General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Library General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Library General Public
  17.  * License along with this library; if not, write to the Free
  18.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  */
  20.  
  21. /*
  22.  * mesamain.c
  23.  *
  24.  * Version 2.0  13 Sep 1998
  25.  * by Jarno van der Linden
  26.  * jarno@kcbbs.gen.nz
  27.  *
  28.  * Driver interface to some Mesa setup stuff
  29.  * (Basically, context.h interface)
  30.  * - Change to using mesamainBase
  31.  * - STUB added to function names, and added
  32.  *   mesamainBase pointers to interface
  33.  */
  34.  
  35. #include "gl/gl.h"
  36. #include "types.h"
  37.  
  38. extern __asm __saveds GLvisual* APIENTRY mesaCreateVisualA(register __a0 void *);
  39. #pragma libcall mesamainBase mesaCreateVisualA a92 801
  40.  
  41. __asm __saveds GLvisual* APIENTRY STUBmesaCreateVisual( register __d0 GLboolean rgb_flag,
  42.                                                         register __d1 GLboolean alpha_flag,
  43.                                                         register __d2 GLboolean db_flag,
  44.                                                         register __d3 GLint depth_bits,
  45.                                                         register __d4 GLint stencil_bits,
  46.                                                         register __d5 GLint accum_bits,
  47.                                                         register __d6 GLint index_bits,
  48.                                                         register __fp0 GLfloat red_scale,
  49.                                                         register __fp1 GLfloat green_scale,
  50.                                                         register __fp2 GLfloat blue_scale,
  51.                                                         register __fp3 GLfloat alpha_scale,
  52.                                                         register __d7 GLint red_bits,
  53.                                                         register __a0 GLint green_bits,
  54.                                                         register __a1 GLint blue_bits,
  55.                                                         register __a2 GLint alpha_bits,
  56.                                                         register __a3 struct Library *mesamainBase )
  57. {
  58.     struct mesaCreateVisualArgs {
  59.         GLboolean rgb_flag;
  60.         GLboolean alpha_flag;
  61.         GLboolean db_flag;
  62.         GLint depth_bits;
  63.         GLint stencil_bits;
  64.         GLint accum_bits;
  65.         GLint index_bits;
  66.         GLfloat red_scale;
  67.         GLfloat green_scale;
  68.         GLfloat blue_scale;
  69.         GLfloat alpha_scale;
  70.         GLint red_bits;
  71.         GLint green_bits;
  72.         GLint blue_bits;
  73.         GLint alpha_bits;
  74.     } args;
  75.  
  76.     args.rgb_flag = rgb_flag;
  77.     args.alpha_flag = alpha_flag;
  78.     args.db_flag = db_flag;
  79.     args.depth_bits = depth_bits;
  80.     args.stencil_bits = stencil_bits;
  81.     args.accum_bits = accum_bits;
  82.     args.index_bits = index_bits;
  83.     args.red_scale = red_scale;
  84.     args.green_scale = green_scale;
  85.     args.blue_scale = blue_scale;
  86.     args.alpha_scale = alpha_scale;
  87.     args.red_bits = red_bits;
  88.     args.green_bits = green_bits;
  89.     args.blue_bits = blue_bits;
  90.     args.alpha_bits = alpha_bits;
  91.  
  92.     return mesaCreateVisualA(&args);
  93. }
  94.